package com.twu.biblioteca.menuoptions;

import com.twu.biblioteca.LibraryManager;
import com.twu.biblioteca.TerminalPrintUtility;

/**
 * Created by olga on 7/06/14.
 */
public class ReturnBookOption extends MenuOption
{
    private static final String SUCCESS_MSG = "Thank you for returning the book.";
    private static final String FAILURE_MSG = "That is not a valid book to return.";

    public ReturnBookOption()
    {
        super("Return a book",null);
    }

    public void action(LibraryManager libraryManager)
    {
        getUserInputValues();
        printSuccessOrFailure( libraryManager.returnBook(getTitle(),getCreator(),getYear()), SUCCESS_MSG, FAILURE_MSG );
    }
}
